/**
 * @author hanzc
 * @date 2021-01-30
 */

const {mock} = require('mockjs');

const refundPart1_1 = require('./json/refundReport/part1_1.json');
const refundPart1_1_2 = require('./json/refundReport/part1_1_2.json');
const refundPart1_2 = require('./json/refundReport/part1_2.json');
const refundPart1_3 = require('./json/refundReport/part1_3.json');
const refundPart1_4 = require('./json/refundReport/part1_4.json');
const refundPart2_1 = require('./json/refundReport/part2_1.json');

const studentCard1 = require('./json/finebi/studentCard1.json');
const studentCard2 = require('./json/finebi/studentCard2.json');
const studentPart1_4 = require('./json/finebi/studentPart1_4.json');
const studentPart3 = require('./json/finebi/studentPart3.json');
const studentPart4 = require('./json/finebi/studentPart4.json');
const studentPart5 = require('./json/finebi/studentPart5.json');
const studentPart6 = require('./json/finebi/studentPart6.json');
const studentPart7 = require('./json/finebi/studentPart7.json');

const profitablePart1 = require('./json/profitableCourseReport/part1.json');
const profitablePart4 = require('./json/profitableCourseReport/part4.json');
const profitablePart5 = require('./json/profitableCourseReport/part5.json');
const profitablePart6 = require('./json/profitableCourseReport/part6.json');
const profitablePart7 = require('./json/profitableCourseReport/part7.json');
const profitablePart8 = require('./json/profitableCourseReport/part8.json');
const profitablePart9 = require('./json/profitableCourseReport/part9.json');
const profitablePart10 = require('./json/profitableCourseReport/part10.json');
const profitablePart11 = require('./json/profitableCourseReport/part11.json');
const profitablePart12 = require('./json/profitableCourseReport/part12.json');

const centerScore0 = require('./json/finebi/centerScore/part0.json');
const centerScore1_1 = require('./json/finebi/centerScore/part1-1.json');
const centerScore1_2 = require('./json/finebi/centerScore/part1-2.json');
const centerScore1_3 = require('./json/finebi/centerScore/part1-3.json');
const centerScore1_4 = require('./json/finebi/centerScore/part1-4.json');
const centerScore2_1 = require('./json/finebi/centerScore/part2-1.json');
const centerScore2_2 = require('./json/finebi/centerScore/part2-2.json');
const centerScore2_3 = require('./json/finebi/centerScore/part2-3.json');
const centerScore2_4 = require('./json/finebi/centerScore/part2-4.json');
const centerScore3_1 = require('./json/finebi/centerScore/part3-1.json');
const centerScore3_2 = require('./json/finebi/centerScore/part3-2.json');
const centerScore3_3 = require('./json/finebi/centerScore/part3-3.json');
const centerScore3_4 = require('./json/finebi/centerScore/part3-4.json');
const centerScore3_5 = require('./json/finebi/centerScore/part3-5.json');
const centerScore3_6 = require('./json/finebi/centerScore/part3-6.json');


const specialClassPart1_1= require('./json/specialClass/part1_1.json');
const specialClassPart1_2= require('./json/specialClass/part1_2.json');
const specialClassPart1_3= require('./json/specialClass/part1_3.json');
const specialClassPart1_4= require('./json/specialClass/part1_4.json');
const specialClassPart1_5= require('./json/specialClass/part1_5.json');
const specialClassPart2_1= require('./json/specialClass/part2_1.json');
const specialClassPart2_2= require('./json/specialClass/part2_2.json');
const specialClassPart3_1= require('./json/specialClass/part3_1.json');
const specialClassPart3_2= require('./json/specialClass/part3_2.json');
const specialClassPart4_1= require('./json/specialClass/part4_1.json');
const specialClassPart4_2= require('./json/specialClass/part4_2.json');
const specialClassPart4_3= require('./json/specialClass/part4_3.json');


const chunji_central_card= require('./json/finebi/chunji/central_card.json');
const chunji_central_card2= require('./json/finebi/chunji/central_card2.json');
const chunji_central_card3= require('./json/finebi/chunji/central_card3.json');
const chunji_central_table= require('./json/finebi/chunji/central_table.json');
const chunji_central_echart1= require('./json/finebi/chunji/central_echart1.json');
const chunji_central_echart2= require('./json/finebi/chunji/central_echart2.json');
const chunji_central_echart3= require('./json/finebi/chunji/central_echart3.json');
const chunji_central_echart4= require('./json/finebi/chunji/central_echart4.json');
const chunji_central_echart5= require('./json/finebi/chunji/central_echart5.json');
const chunji_central_table2= require('./json/finebi/chunji/central_table2.json');
const chunji_central_table3 = require('./json/finebi/chunji/central_table3.json');


const chunji_general_part1= require('./json/finebi/chunji/general_part1.json');
const chunji_general_part2= require('./json/finebi/chunji/general_part2.json');
const chunji_general_part3= require('./json/finebi/chunji/general_part3.json');
const chunji_general_part4= require('./json/finebi/chunji/general_part4.json');
const chunji_general_part5= require('./json/finebi/chunji/general_part5.json');
const chunji_general_part6= require('./json/finebi/chunji/general_part6.json');
const chunji_general_part7= require('./json/finebi/chunji/general_part7.json');
const chunji_general_part8= require('./json/finebi/chunji/general_part8.json');
const chunji_department_part3 = require('./json/finebi/chunji/department_part3.json');
const chunji_department_part4 = require('./json/finebi/chunji/department_part4.json');



const detail = require('./json/finebi/studentDetail.json');

const spring_bar_1 = require('./json/springDepartment/bar1.json');

const spring_bar_excel_1 = require('./json/springDepartment/barExcel1.json');

const table_driling = require('./json/springDepartment/excel.json');
const table_driling2 = require('./json/springDepartment/excel2.json');
const table_driling3 = require('./json/springDepartment/excel3.json');
const table_driling4 = require('./json/springDepartment/excel4.json');
const table_driling5 = require('./json/springDepartment/excel5.json');

const Table_part_six = require('./json/springDepartment/tabelPartSix.json');

const Table_part_eight = require('./json/springDepartment/tablePartEight.json');

const percentRate = require('./json/springDepartment/percentRate.json');

module.exports = {
    // 'POST /api/agility/view/select': (req, res) => {
    //     const rtn = {
    //         code: 0,
    //         msg: null,
    //         data: ['aaaa', 'bbbbb', 'cccc'],
    //         pager: {
    //             pageNum: 1,
    //             pageSize: 50,
    //             count: 100
    //         }
    //     };
    //     // setTimeout(() => {
    //     return res.json(rtn);
    //     // }, 1000);
    // },
    'POST /api/agility/central/select': (req, res) => {
        const rtn = {
            code: 0,
            msg: null,
            data: ['aaaa', 'bbbbb', 'cccc'],
            pager: {
                pageNum: 1,
                pageSize: 50,
                count: 100
            }
        };
        // setTimeout(() => {
        return res.json(rtn);
        // }, 1000);
    },
    'POST /api/agility/view/values1': (req, res) => {
        try {
            // console.log(req.body);
            // 退费看板
            if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanOnePart_partOne') {
                return res.json(refundPart1_1);
            } if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanOnePart_partOne_Two') {
                return res.json(refundPart1_1_2);
            } if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanOnePart_partTwo') {
                return res.json(refundPart1_2);
            } if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanOnePart_partThree') {
                return res.json(refundPart1_3);
            } if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanOnePart_partFour') {
                return res.json(refundPart1_4);
            } if (req.body.dashBoardList[0].dashBoardId === 'refundKanbanTwoPart_partOne') {
                return res.json(refundPart2_1);
            }

            // 寒春学员结构看板
            if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsOnePart_partOne') {
                return res.json(studentCard1);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsOnePart_partTwo') {
                return res.json(studentCard2);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsOnePart_partFour') {
                return res.json(studentPart1_4);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsOnePart_partThree') {
                return res.json(studentPart3);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsTwoPart_partOne') {
                return res.json(studentPart4);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsTwoPart_partTwo') {
                return res.json(studentPart5);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsTwoPart_partThree') {
                return res.json(studentPart6);
            } if (req.body.dashBoardList[0].dashBoardId === 'structureStudentsTwoPart_partFour') {
                return res.json(studentPart7);
            }

            // 正价课看板
            if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartOne') {
                return res.json(profitablePart1);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartFour') {
                return res.json(profitablePart4);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartFive') {
                return res.json(profitablePart5);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartSix') {
                return res.json(profitablePart6);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartSeven') {
                return res.json(profitablePart7);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartEight') {
                return res.json(profitablePart8);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartNine') {
                return res.json(profitablePart9);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartTen') {
                return res.json(profitablePart10);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartEleven') {
                return res.json(profitablePart11);
            } if (req.body.dashBoardList[0].dashBoardId === 'PriceClass_PartTwelve') {
                return res.json(profitablePart12);
            }

            // 中心评分
            if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_Title') {
                return res.json(centerScore0);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_ConversionRate_PartOne') {
                return res.json(centerScore1_1);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_ConversionRate_PartTwo') {
                return res.json(centerScore1_2);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_ConversionRate_PartThree') {
                return res.json(centerScore1_3);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_ConversionRate_PartFour') {
                return res.json(centerScore1_4);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PerCapitaCapacity_PartOne') {
                // return res.json(centerScore2_1);
                return res.json({});
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PerCapitaCapacity_PartTwo') {
                return res.json(centerScore2_2);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PerCapitaCapacity_PartThree') {
                return res.json(centerScore2_3);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PerCapitaCapacity_PartFour') {
                return res.json(centerScore2_4);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartOne') {
                return res.json(centerScore3_1);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartFive') {
                return res.json(centerScore3_2);
            } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartSix') {
                return res.json(centerScore3_3);
            }

            // 专题课行课数据
            if (req.body.dashBoardList[0].dashBoardId === 'OrderCoreDataOverview_PartOne') {
                return res.json(specialClassPart1_1);
            } if (req.body.dashBoardList[0].dashBoardId === 'OrderCoreDataOverview_PartTwo') {
                return res.json(specialClassPart1_2);
            } if (req.body.dashBoardList[0].dashBoardId === 'OrderCoreDataOverview_PartThree') {
                return res.json(specialClassPart1_3);
            } if (req.body.dashBoardList[0].dashBoardId === 'OrderCoreDataOverview_PartFour') {
                return res.json(specialClassPart1_4);
            } if (req.body.dashBoardList[0].dashBoardId === 'OrderCoreDataOverview_PartFive') {
                return res.json(specialClassPart1_5);
            } if (req.body.dashBoardList[0].dashBoardId === 'specialClass_part2_1') {
                return res.json(specialClassPart2_1);
            }if (req.body.dashBoardList[0].dashBoardId === 'specialClass_part2_2') {
                return res.json(specialClassPart2_2);
            }if (req.body.dashBoardList[0].dashBoardId === 'OrderOfflineData_PartOne') {
                return res.json(specialClassPart3_1);
            }if (req.body.dashBoardList[0].dashBoardId === 'OrderOfflineData_PartTwo') {
                return res.json(specialClassPart3_2);
            }if (req.body.dashBoardList[0].dashBoardId === 'specialCollect_PartOne') {
                return res.json(specialClassPart4_1);
            }if (req.body.dashBoardList[0].dashBoardId === 'specialCollect_PartTwo') {
                return res.json(specialClassPart4_2);
            }if (req.body.dashBoardList[0].dashBoardId === 'specialCollect_PartThree') {
                return res.json(specialClassPart4_3);
            }
            //春季续班学部看板
            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartOne') {
                // return res.json({
                //     code: 0,
                //     data: {}
                // });
                return res.json(spring_bar_1);
            }

            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartTen') {
                return res.json(table_driling4);
            }

            // 春季续班-中心维度
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partOne_Renewal_Number') {
                return res.json(chunji_central_card3);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partSix_Assistant_Work_Time_Partition_1') {
                return res.json(chunji_central_table);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partSix_Assistant_Work_Time') {
                return res.json(chunji_central_echart4);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partSix_Renewal_Num') {
                return res.json(chunji_central_echart5);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partTwo_Center_Basic') {
                return res.json(chunji_central_table2);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partSeven_Speaker_Ranking') {
                return res.json(chunji_central_table3);
            }


            // 春季续班-概览
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partTwo_Total_Renewal_Degree') {
                return res.json(chunji_general_part1);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partThree_Department_Total_Renewal_Percentage') {
                return res.json(chunji_general_part2);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partThree_Department_Renewal_Extension_Transformation') {
                return res.json(chunji_general_part3);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartThree') {
                return res.json(chunji_general_part4);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartFour') {
                return res.json(chunji_general_part5);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartThree_1') {
                return res.json(chunji_department_part3);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartFour_1') {
                return res.json(chunji_department_part4);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partFive_Center_Total_Renewal_Accomplished_Percentage') {
                return res.json(chunji_general_part6);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partFive_Area_Renewal_Extension_Transformation') {
                return res.json(chunji_general_part7);
            }
            if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partSix_Center_Original_Student_transformation') {
                return res.json(chunji_general_part8);
            }

            // 其他报表 xxx
            return res.json(studentCard1);
        }
        catch (e) {
            return res.json(studentCard1);
        }
    },

    'POST /api/agility/view/detail': (req, res) => res.json(detail),
    'POST /api/agility/central/values': (req, res) => {
        if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartTwo') {
            return res.json(centerScore3_4);
        } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartThree') {
            return res.json(centerScore3_5);
        } else if (req.body.dashBoardList[0].dashBoardId === 'CentralScoring_PlateDiagnosis_PartFour') {
            return res.json(centerScore3_6);
        }
    },

    // 春季续班学部看板
    'POST /api/springContinuation/values': (req, res) => {
        if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartSix') {
            return res.json(Table_part_six);
        }
        if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartEight') {
            return res.json(Table_part_eight);
        }
        return res.json({
            code: 0,
            data: {}
        });
    },
    'POST /api/springContinuation/excelValues': (req, res) => {
        // return res.json({
        //     code: 0,
        //     data: {}
        // });
        if (req.body.dashBoardList[0].dashBoardId === 'DepartmentDimensionReport_PartSeven') {
            return res.json(spring_bar_excel_1);
        }
    },
    'POST /api/springContinuation/valuesPercentage': (req, res) => {
        if (req.body.dashBoardList[0].dashBoardId === 'Renewal_Overview_partSix_Center_Original_Student_transformation') {
            return res.json(chunji_general_part8);
        }
        else if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partThree_Renewal_Accomplish') {
            return res.json(chunji_central_echart1);
        } else if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partFour_Subject_Transformation') {
            return res.json(chunji_central_echart2);
        } else if (req.body.dashBoardList[0].dashBoardId === 'Center_Dimension_partFive_Grade_Transformation') {
            return res.json(chunji_central_echart3);
        }
        return res.json(percentRate);
    },
    'POST /api/agility/notification/message': (req, res) => {
        const rtn = {
            code: 0,
            msg: null,
            data: {
                messageId: '11111',
                text: '你好啊，这是错误提示信息，跑马灯展示。',
                hidden: 1
            },
            pager: {
                pageNum: 1,
                pageSize: 50,
                count: 100
            }
        };
        return res.json(rtn);
    }
};
